using imitateMacQQ.WebApi.Domain.CircleServe.Entity.dao;
using imitateMacQQ.WebApi.Domain.CircleServe.Interface;
using imitateMacQQ.WebApi.Domain.Request.utils;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace imitateMacQQ.WebApi.Api.Circle;

[ApiController]
[Route("api/[controller]/[action]")]
public class GetCircleController : ControllerBase
{
    private readonly IGetCircle _getCircle;

    public GetCircleController(IGetCircle getCircle)
    {
        _getCircle = getCircle;
    }

    [Authorize]
    [HttpGet]
    public async Task<Request<DimCircleData[]>> GetDimData(string account)
    {
        return await _getCircle.GetDimDataCircle(account);
    }

    [Authorize]
    [HttpGet]
    public async Task<Request<CircleAllData>> GetAllData(string account,
        string remark)
    {
        return await _getCircle.GetAllDataCircle(account, remark);
    }

    [Authorize]
    [HttpGet]
    public async Task<Request<string>> GetName(string account)
    {
        return await _getCircle.GetName(account);
    }

    [Authorize]
    [HttpGet]
    public async Task<Request<OtherData>> GetOtherData(string account, string send,
        string remark)
    {
        return await _getCircle.GetOther(account, send, remark);
    }
}